﻿<UserControl x:Class="CheckerWPF.UserControls.uclOptionChecker"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:conv="clr-namespace:CheckerWPF.Converters"
             mc:Ignorable="d" 
             Height="{Binding CheckerHeight}" Width="{Binding CheckerWidth}"
             d:DesignHeight="60" d:DesignWidth="439">

    <Grid Name="LayoutRoot">
        <Grid.Resources>
            <conv:OptionCheckerConverter x:Key="OptionCheckerConverter" />
        </Grid.Resources>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <RadioButton Grid.Row="3">
            <TextBlock Text="gfghhj" />
        </RadioButton>

        <RadioButton Name="radOption1" Grid.Row="0" Content="{Binding OptionY}" 
                     HorizontalAlignment="Stretch" VerticalAlignment="Center" 
                     IsChecked="{Binding ElementName=chkOption, Path=IsChecked, Converter={StaticResource OptionCheckerConverter}, ConverterParameter=Y}" HorizontalContentAlignment="Left" />
        <RadioButton Name="radOption2" Grid.Row="1" Content="{Binding OptionN}" 
                     HorizontalAlignment="Stretch" VerticalAlignment="Center" 
                     IsChecked="{Binding ElementName=chkOption, Path=IsChecked, Converter={StaticResource OptionCheckerConverter}, ConverterParameter=N}" />
        <CheckBox Name="chkOption" Grid.Row="2" Content="{Binding CheckerText}" 
                  Checked="chkOption_Checked" 
                  HorizontalAlignment="Stretch" VerticalAlignment="Center" />
    </Grid>
</UserControl>
